<?php
include('../../class/city_rus.php');
include('../../includes/cities.php');
$cityRus=new city_rus_class();
if($_GET['cityRegion'])
{
	//echo $_GET['cityRegion'];
	//$cityRegion=iconv("UTF-8", "WINDOWS-1251", $_GET['cityRegion']);
	if(!$cityRegion)$cityRegion=$_GET['cityRegion'];
	//$city=iconv("UTF-8", "WINDOWS-1251", $_GET['city']);
	if(!$city)$city=$_GET['city'];
	echo ('
	<div class="cityRes">
	');
	for($i=0; $i<count($region[$cityRegion]); $i++)
	{
		if($cityRus->city_rus_im($region[$cityRegion][$i])==$city)continue;
		echo ('
		<a href="index.php?city='.$region[$cityRegion][$i].'">'.$cityRus->city_rus_im($region[$cityRegion][$i]).'</a><br />
		');
	}
	echo ('
	</div>
	');
}
if($_GET['region'])
{
	$curRegion=iconv("UTF-8", "WINDOWS-1251", $_GET['region']);
	if(!$curRegion)$curRegion=$_GET['region'];
	echo ('
	<div class="regionsRes">
	');
	foreach($region as $regionKey=>$regionCities)
	{
		if($regionKey==$curRegion)continue;
		echo ('
		<div class="regions">'.$regionKey.'</div>
		');
	}
	echo ('
	</div>
	');
}
?>